r = 1 gotshipslog = 0 pocketwatch = 0 photo = 0 doll = 0 crewmate = 1 captain = 1 wife = 1 daughter = 1 SCREEN 12 COLOR 7, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 20 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 16) AS STRING directions(1) = "EAST OR SOUTH" directions(2) = "EAST OR WEST" directions(3) = "EAST OR WEST" directions(4) = "WEST OR SOUTH" directions(5) = "NORTH OR WEST" directions(6) = "EAST OR WEST" directions(7) = "EAST, WEST, OR DOWN" directions(8) = "NORTH OR EAST" directions(9) = "EAST, WEST, OR UP" directions(10) = "EAST, WEST, OR NORTH" directions(11) = "NORTH OR WEST" directions(12) = "EAST OR SOUTH" directions(13) = "EAST, WEST, OR SOUTH" directions(14) = "EAST OR WEST" directions(15) = "EAST" directions(16) = "EAST" PRINT "" PRINT "" PRINT "It has been month's since the tragic day to which the Mary Celeste went" PRINT "missing without anyone knowing what caused it's crew to vanish. But alas" PRINT "with searching and with some luck, she was found, and brought back to port." PRINT "Now it is your job to find out just what had happened to the crew. You" PRINT "don't have long, as the insurance company wishes to sell this vessel before" PRINT "the end of the week." PRINT "" DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT PRINT PRINT " " PRINT " " PRINT " " PRINT " The Mary Celeste " PRINT " " PRINT " Written by " PRINT " " PRINT " D.B. Taylor" PRINT "" PRINT " Copyright (c) 2015" PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 IF r = 10 THEN: GOSUB r10 IF r = 11 THEN: GOSUB r11 IF r = 12 THEN: GOSUB r12 IF r = 13 THEN: GOSUB r13 IF r = 14 THEN: GOSUB r14 IF r = 15 THEN: GOSUB r15 IF r = 16 THEN: GOSUB r16 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotphoto = 1 THEN: PRINT "The photo of the Captains pride and joy." IF gotdoll = 1 THEN: PRINT "The daughters doll." IF gotpocketwatch = 1 THEN: PRINT "The Captain's Pocket watch." IF gotshipslog = 1 THEN: PRINT "The ships log book." PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 5 THEN: r = 4: GOTO moved IF r = 8 THEN: r = 1: GOTO moved IF r = 11 THEN: r = 12: GOTO moved IF r = 10 THEN: r = 13: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 4: GOTO moved IF r = 8 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 15 THEN: r = 14: GOTO moved IF r = 14 THEN: r = 13: GOTO moved IF r = 13 THEN: r = 12: GOTO moved IF r = 16 THEN: r = 9: GOTO moved IF r = 9 THEN: r = 10: GOTO moved IF r = 10 THEN: r = 11: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 4 THEN: r = 5: GOTO moved IF r = 1 THEN: r = 8: GOTO moved IF r = 12 THEN: r = 11: GOTO moved IF r = 13 THEN: r = 10: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 4 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 2: GOTO moved IF r = 2 THEN: r = 1: GOTO moved IF r = 5 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 7: GOTO moved IF r = 7 THEN: r = 8: GOTO moved IF r = 11 THEN: r = 10: GOTO moved IF r = 10 THEN: r = 9: GOTO moved IF r = 9 THEN: r = 16: GOTO moved IF r = 12 THEN: r = 13: GOTO moved IF r = 13 THEN: r = 14: GOTO moved IF r = 14 THEN: r = 15: GOTO moved END IF IF cmd$ = "GO UP" OR cmd$ = "UP" OR cmd$ = "U" THEN IF r = 9 THEN: r = 7: GOTO moved END IF IF cmd$ = "GO DOWN" OR cmd$ = "DOWN" OR cmd$ = "D" THEN IF r = 7 THEN: r = 9: GOTO moved END IF IF (cmd$ = "EXAMINE CAPTAIN") AND r = 15 THEN CLS PRINT "He faintly moves in and out of the realm of the living. His face is" PRINT "permanently pulled back, a look of terror, and pain upon his face." PRINT "Before you know it, he vanishes before you, to a fate worse than death." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE WIFE") AND r = 16 THEN CLS PRINT "She stands before you, her arms are crossed, and looks feverish. It" PRINT "is as if she is battling the cold or the flu? She seems scared and" PRINT "is muttering to herself...just what is she saying?" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE DAUGHTER") AND r = 14 THEN CLS PRINT "She's sitting on the floor. Holding her doll and talking to it as if" PRINT "it were alive. Poor child, my heart weeps for thee." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE CREWMATE") AND r = 10 THEN CLS PRINT "He runs towards you, with his hands on the sides of his mouth. As if" PRINT "he was trying to warn everyone of what was to come." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE SHIPS LOG") AND gotshipslog = 1 THEN CLS PRINT "A newish leather bound book. With the name of the ship written on a" PRINT "white card placed on the cover." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "READ SHIPS LOG") AND gotshipslog = 1 THEN CLS PRINT "You open it and turn to the last entry. It reads -All is lost and I" PRINT "have damned them all.-" DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE POCKET WATCH") AND gotpocketwatch = 1 THEN CLS PRINT "A handcrafted gold pocket watch. Most likely a gift from his wife." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "OPEN POCKET WATCH") AND gotpocketwatch = 1 THEN CLS PRINT "You open the watch and find that the watch had stopped at -9:15-." PRINT "There's an inscription that reads -To my loving Husband. Sarah." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE PHOTO") AND gotphoto = 1 THEN CLS PRINT "The photo is that of the Mary Celeste. The job of which he had always" PRINT "wanted. With that it brought him death." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE DOLL") AND gotdoll = 1 THEN CLS PRINT "A store bought doll. From some toy store on the upper part of town." PRINT "Looks expensive and there fore must be the daughters." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK" OR cmd$ = "TALK TO CAPTAIN") AND captain = 1 AND r = 15 THEN CLS PRINT "What are you doing here? Your not suppose to be here? No one" PRINT "is. -You fool, this ship is cursed, and so will be your soul.-" PRINT "He laughs like an insane old man on the brink of death, laughing" PRINT "just one last time before slipping away." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "GIVE DOLL") AND gotdoll = 1 AND r = 15 THEN GOTO lose: END IF IF (cmd$ = "TALK" OR cmd$ = "TALK TO WIFE") AND wife = 1 AND r = 16 THEN CLS PRINT "Just what in the devil happened here? -My husband's a good" PRINT "man. He didn't mean too, he didn't mean too. You see, he's" PRINT "a god fearing man, but he just couldn't handle the presure" PRINT "of it no more, no more, no more..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "GIVE POCKET WATCH") AND gotpocketwatch = 1 AND r = 16 THEN GOTO win: END IF moved: RETURN r1: PRINT "You are standing upon the deck of the Mary Celeste. An eerie" PRINT "feeling washes over you." RETURN r2: PRINT "The crash of the washes upon the shore echo through the winds." RETURN r3: PRINT "Being the only one on board, you feel as if you are being watched." RETURN r4: PRINT "The faint stench of rotten flesh and the lingering tail end of" PRINT "death surrounds you. Nothing but deadman's tales upon this vessel." RETURN r5: PRINT "You are standing before a railing. The ocean is quiet restless and" PRINT "it feels as if the sea herself is against you being here." RETURN r6: PRINT "The faint cries of the recently murdered fills the air. The world" PRINT "that was taking place upon this ship, seems to bring fear and pain." RETURN r7: PRINT "You are standing before a ladder that will bring you to the bottom" PRINT "level." RETURN r8: PRINT "With every step you take, the wood beneath your feet creeks and cracks." RETURN r9: PRINT "You are standing before the small living quarters that housed those" PRINT "poor souls." PRINT "" IF gotpocketwatch = 0 THEN: PRINT "A gold pocket watch rests on a small desk." IF gotpocketwatch = 1 THEN: PRINT "You take the pocket watch." RETURN r10: PRINT "You are witnessed by the spirit of one of the formal crewman. He" PRINT "passes back and forth and does not even see you." RETURN r11: PRINT "You wander around the lower elvel of the ship. A strong musty smell" PRINT "of dust and mold fills the air." PRINT "" IF gotphoto = 0 THEN: PRINT "A framed photo is hanging on the wall." IF gotphoto = 1 THEN: PRINT "You take the photo." RETURN r12: PRINT "You wonder what had just happened upon this ship all those months" PRINT "ago and while you do hear the odd whisper and groan. You feel almost" PRINT "at home here." RETURN r13: PRINT "A cold breeze embraces you which is odd since it's humid out." RETURN r14: PRINT "You hear the laughter of a little girl fills the area. Before your" PRINT "eye's you see the faint image of the daughter. Just what in God's name" PRINT "is going on here?" PRINT "" IF gotdoll = 0 THEN: PRINT "A childs doll rests on the floor." IF gotdoll = 1 THEN: PRINT "You take the doll." RETURN r15: PRINT "A man stands before you and is crying into his hands. He mutters" PRINT "something about having to do God's work! Must be the Captain!" PRINT "" IF gotshipslog = 0 THEN: PRINT "The ships log book is resting on a desk." IF gotshipslog = 1 THEN: PRINT "You take the log book." RETURN r16: PRINT "You reach the end of the short hallway and are greeted by that of" PRINT "who was once the mother and husband of the family who's lived were" PRINT "cut short." RETURN win: COLOR 2, 0 CLS PRINT "A bright light blinds you as you find yourself standing on" PRINT "the shore. The ship is no more, it vanished before the sun" PRINT "rose filling the area with a warmth that brings you new life." PRINT "The souls of the lost crew are now at rest." PRINT DO: LOOP UNTIL INKEY$ <> "" END lose: COLOR 2, 0 CLS PRINT "You are thrown into a black void of death and despair. Darkness" PRINT "surrounds you and you spend eternity with the murderous Captain" PRINT "and his trapped souls for all eternity." PRINT DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "You find nothing that could be used towards cracking the case. I guess" PRINT "this mystery will never go solved." _DISPLAY END END SUB